package com.example.chronicdisease.mapper;

import com.example.chronicdisease.pojo.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealMapper {
    int deleteByPrimaryKey(Integer smId);

    int insert(Setmeal record);

    int insertSelective(Setmeal record);

    Setmeal selectByPrimaryKey(Integer smId);

    int updateByPrimaryKeySelective(Setmeal record);

    int updateByPrimaryKey(Setmeal record);

    //采用注解开发对数据库进行增删改查
    @Select("select smId, name, type, price from setmeal where type=#{type} order by smId")
    public List<Setmeal> selectByType(Integer type);

    //根据套餐编号查询检查项目编号
    @Select("select ciId from setmealdetailed where smId=#{smId}")
    public List<Integer> selectBySmId(Integer smId);

    public Setmeal getSetmealById(Integer smId);

    public Setmeal getSetmealById2(Integer smId);



}